package com.ruoyi.web.ydz.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.ydz.util.areaUtil.AreaUtil;
import com.ruoyi.web.ydz.util.generatePDF.CreatePdfEchrtsAndTableMain;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;

@Controller
@RequestMapping({"/api/text"})
public class textController {

    @Resource
    private CreatePdfEchrtsAndTableMain createPdfEchrtsAndTableMain3;

    @Resource
    private AreaUtil areaUtil;

    @GetMapping("/getArea")
    public void areaUtil(HttpServletRequest request){
        HashMap clientIp = areaUtil.getClientIp(request);
        System.out.println();
    }
    @PostMapping("/export")
    public AjaxResult export(HttpServletRequest request, HttpServletResponse response){
        createPdfEchrtsAndTableMain3.ImageToPDF(new ArrayList<String>(), request,response);
        return null;
    }

}
